package com.solcoo.merchant;

import java.net.URLEncoder;

public class Constant {

	public static class URL {

		public static final String BASE_URL = "http://42.120.7.37:8080/Solcoo/";

		private static final int USER_TYPE = 1;

		public static String getReg(String phoneNo, String pwd) {
			StringBuilder u = new StringBuilder(BASE_URL);
			u.append("signup.do?");
			u.append("shoujih=").append(phoneNo);
			u.append("&mima=").append(pwd);
			u.append("&leixing=").append(USER_TYPE);
			return u.toString();
		}

		public static String getCheckCode(String phoneNo) {
			StringBuilder u = new StringBuilder(BASE_URL);
			u.append("check.do?");
			u.append("shoujih=").append(phoneNo);
			return u.toString();
		}

		public static String getLogin(String name, String pwd) {
			StringBuilder u = new StringBuilder(BASE_URL);
			u.append("login.do?");
			u.append("yonghum=").append(name);
			u.append("&mima=").append(pwd);
			u.append("&leixing=").append(USER_TYPE);
			return u.toString();
		}

		public static String getEdit(String editKey, String editValue,
				String cardNo) {
			StringBuilder u = new StringBuilder(BASE_URL);
			u.append("update.do?");
			u.append("yonghum=").append(cardNo);
			u.append("&").append(editKey).append("=")
					.append(URLEncoder.encode(editValue));
			return u.toString();
		}

		public static String getHeadEdit() {
			StringBuilder u = new StringBuilder(BASE_URL);
			u.append("updatePic.do");
			return u.toString();
		}
	}

	public static class SharedKey {
		public static final String USER = "SHAREDKEY_USER";
	}
}
